<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <link href="../assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="../assets/css/cl-css.css" rel="stylesheet">
    <link href="../assets/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../assets/highlight/styles/railscasts.css">
    <link rel="stylesheet" href="/assets/editor/css/editormd.css"/>
    <title>添加博客</title>
</head>
<body>
{{template "header"}}
<form action="/add_blog" method="post" enctype="multipart/form-data">
    <div class="row" style="height: 500px">
        <div class="col-md-8">
            <div id="test-editor">
                <textarea name="content" style="display:none;"></textarea>
            </div>
        </div>
        <div class="col-md-3 mt-3">
            <div class="mb-3">
                <label for="exampleInputEmail1" class="form-label">添加标题</label>
                <input type="text" class="form-control" name="title" id="exampleInputEmail1"
                       aria-describedby="emailHelp">
            </div>
            <div class="mb-3">
                <label for="exampleInputPassword1" class="form-label">添加描述</label>
                <input type="text" class="form-control" name="tag" id="exampleInputPassword1">
            </div>
            <div class="mb-3">
                <label for="formFile" class="form-label">封面</label>
                <input class="form-control" type="file" name="bolgImg" id="formFile">
            </div>
            <button type="submit" class="btn btn-primary">Submit</button>
        </div>
    </div>
</form>
<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="/assets/editor/editormd.min.js"></script>
<script type="text/javascript">
    $(function () {
        var editor = editormd("test-editor", {
            width: "100%",
            height: "100%",
            path: "/assets/editor/lib/",
            watch: false
        });
    });
</script>
</body>
</html>